import com.wago.dao.StudentDao;
import com.wago.entity.Studnet;
import com.wago.mapper.StudentMapper;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by "鐤媯鐨勭爜宸�" on 2017-09-11.
 */
public class Demo {
    @Test
    public void aa(){
        ClassPathXmlApplicationContext cpc= new ClassPathXmlApplicationContext("appliacton.xml");
        StudentMapper stu=cpc.getBean(StudentMapper.class);
        //Studnet s=stu.ByID(2);
        //System.out.println(s);
        StudentDao sd=cpc.getBean(StudentDao.class);
        //System.out.println(sd.aa(2));
        Studnet st=new Studnet();
        st.setSname("科比");
        st.setScore(80.00);
        st.setSaddress("美国洛杉矶");
        sd.bb(st);
        cpc.close();

    }
}
